/*
 * xlua.h
 * This file is part of OpenAnimator
 *
 * Copyright (C) 2008 - Abhinav Lele
 *
 * OpenAnimator is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * OpenAnimator is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with OpenAnimator; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */
 
#ifndef __OA_XLUA_H__
#define __OA_XLUA_H__

extern "C" {
#include "lua/lua.h"
#include "lua/lualib.h"
#include "lua/lauxlib.h"
}
#include "dictionary.h"
#include "parser.h"
#include "render.h"

extern Library myLibrary;
extern Canvas  myCanvas;
extern Config  myConfig;
extern Parser  myParser;
extern Renderer myRenderer;

inline int XLUA_library_new(lua_State *L){ return myLibrary.LUA_new(L); }
inline int XLUA_library_get(lua_State *L){ return myLibrary.LUA_get(L); }
inline int XLUA_library_set(lua_State *L){ return myLibrary.LUA_set(L); }
inline int XLUA_library_del(lua_State *L){ return myLibrary.LUA_del(L); }


inline int XLUA_canvas_new(lua_State *L){ return myCanvas.LUA_new(L); }
inline int XLUA_canvas_get(lua_State *L){ return myCanvas.LUA_get(L); }
inline int XLUA_canvas_set(lua_State *L){ return myCanvas.LUA_set(L); }
inline int XLUA_canvas_del(lua_State *L){ return myCanvas.LUA_del(L); }

inline int XLUA_config_new(lua_State *L){ return myConfig.LUA_new(L); }
inline int XLUA_config_get(lua_State *L){ return myConfig.LUA_get(L); }
inline int XLUA_config_set(lua_State *L){ return myConfig.LUA_set(L); }
inline int XLUA_config_del(lua_State *L){ return myConfig.LUA_del(L); }

inline int XLUA_parser_set_mapping(lua_State *L){ return myParser.LUA_set_mapping(L); }
inline int XLUA_parser_get_mapping(lua_State *L){ return myParser.LUA_get_mapping(L); }


inline int XLUA_renderer_set_mapping(lua_State *L){ return myRenderer.LUA_set_mapping(L); }
inline int XLUA_renderer_get_mapping(lua_State *L){ return myRenderer.LUA_get_mapping(L); }


/*

inline int XLUA_set_event(lua_State *L){ return Util::events.LUA_set_event(L); }
inline int XLUA_renderer_set_mapping(lua_State *L){ return Util::controller.render_instance.LUA_set_mapping(L); }
inline int XLUA_renderer_get_mapping(lua_State *L){ return Util::controller.render_instance.LUA_get_mapping(L); }
inline int XLUA_controller_set_mapping(lua_State *L){ return Util::controller.LUA_set_mapping(L); }
inline int XLUA_controller_get_mapping(lua_State *L){ return Util::controller.LUA_get_mapping(L); }


*/

#endif
